package flex.cc.uac.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import flex.cc.uac.entity.UacMenuEntity;

/**
 * 菜单表
 * 
 * @author zhangzk
 * @email zhangzhikai@sinosoft.com.cn
 * @date 2020-07-11 22:29:37
 */
@Mapper
public interface UacMenuDao extends BaseMapper<UacMenuEntity> {

    List<UacMenuEntity> findMenuListByUserId(Long userId);

    List<UacMenuEntity> listMenuListByRoleId(Long roleId);

    List<Long> getCheckedMenuList(Long roleId);
    
    /**
     * 根据menuid查询自身和父级菜单
     * @param menuList
     * @return
     */
    List<UacMenuEntity> getMenuTreeByMenuId(@Param("menuList") List<UacMenuEntity> menuList);
}
